package moriarty.gwt.client;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;

public class HowItWorksTab  extends Composite{

	private static HowItWorksTab instance = null;	
	
	public static HowItWorksTab getInstance(){
	     if(instance == null) {
	         instance = new HowItWorksTab();
	      }
	      return instance;
	}
	
	protected HowItWorksTab(){
		init();
	}

	private void init(){
		VerticalPanel panel = new VerticalPanel();
		final HTML howToText = new HTML("1. Join the Song of The Day (SoTD) Community </br>" +
				"2. Find and subscribe to SoTD Groups </br>" +
				"3. Once per day you have the chance to submit a Song of the Day (per group)</br>" +
				"4. What are you waiting for? Click the \"Join!\" button and get started :) </br>");
		panel.add(howToText);
		
		final Button joinButton = new Button("Join!");
		joinButton.addClickHandler(new JoinHandler());
		joinButton.addKeyUpHandler(new JoinHandler());
		panel.add(joinButton);	
		initWidget(panel);
	}
	
}
